Skip to content

Add component container for EventsCBGExecutor + Isolated component container for all events based executors - #3123

Closed
skyegalaxy wants to merge 2 commits into
ros2:rollingfrom
skyegalaxy:skyegalaxy/add-new-component-containers
Closed

Add component container for EventsCBGExecutor + Isolated component container for all events based executors#3123
skyegalaxy wants to merge 2 commits into
ros2:rollingfrom
skyegalaxy:skyegalaxy/add-new-component-containers

Conversation

@skyegalaxy

Copy link
Copy Markdown
Member

Description

Fixes # (issue)

Is this user-facing behavior change?

Yes, users will now be able to use the EventsCBGExecutor in a component container, and both the EventsExecutor and EventsCBGExecutor in an isolated component container.

Did you use Generative AI?

Nope

Additional Information

Depends on #3097
Partial re-implementation of #2541, but with additional options for the EventsCBGExecutor to be run in single threaded or multithreaded mode

Skyler Medeiros added 2 commits April 8, 2026 17:24
Signed-off-by: Skyler Medeiros <skye@polymathrobotics.com>
Signed-off-by: Skyler Medeiros <skye@polymathrobotics.com>
Comment on lines +53 to +56
if (executor_type == "events") {
using executor = rclcpp::experimental::executors::EventsExecutor;
using ComponentManagerIsolated = rclcpp_components::ComponentManagerIsolated<executor>;
exec = std::make_shared<executor>();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I don't think anything in the experimental namespace should be officially supported in a thing like this. Especially knowing that this is going to be depreciated in short order with the new one

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably we can say EventExecutor is now graduated phase as official for next turtle-M release from the incubation experimental phase?

} else {
using ComponentManagerIsolated =
rclcpp_components::ComponentManagerIsolated<rclcpp::executors::SingleThreadedExecutor>;
} else if (executor_type == "cbg-single-threaded") {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there might be an issue here. Taking the SingleThreadedExecutor and MultiThreadedExecutor as examples, we currently always create a SingleThreaded Executor to manage the components, and pass the executor type to the isolated component manager based on the cli args. The SingleThreadedExecutor is responsible for loading and unloading components

If I am understanding this correctly, with this PR we are creating a single/threaded event executor based on the cli args to manage the components, but then for each component we always create a multi-threaded event executor, correct?

I also wonder if we really need separate cbg-single-threaded vs cbg-multi-threaded. Instead, I think we could take the thread count from ros arguments (similar to the new executable in this PR), and if it is not specified, default to the multi-threaded event executor. What do you think?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good callout. I'll make those changes on the other PR

@skyegalaxy

Copy link
Copy Markdown
Member Author

Closed in favor of #3134

@skyegalaxy skyegalaxy closed this Apr 19, 2026
vooon added a commit to mavlink/mavros that referenced this pull request Aug 2, 2026
Enable use_intra_process_comms(true) for the mavros_node container and
the dynamically created plugin nodes, so the internal MAVLink bus and
co-located subscribers go zero-copy (cross-process consumers fall back
to DDS, so this is safe either way).

test_compose.launch.py:
- fcu_url/gcs_url as launch arguments instead of hardcoded URLs
- add an 'executor' argument (mt by default, events/auto opt-in). The
  Callback Group Events executor's component-container support is still
  immature upstream (ros2/rclcpp#3186: shutdown double-remove;
  ros2/rclcpp#3123: container support), so default to the reliable
  component_container_mt and only use component_container
  --executor-type events-cbg when asked
- resolve URLs in an OpaqueFunction so list parameters keep their type
- tone down container log level from DEBUG to INFO
vooon added a commit to mavlink/mavros that referenced this pull request Aug 4, 2026
Enable use_intra_process_comms(true) for the mavros_node container and
the dynamically created plugin nodes, so the internal MAVLink bus and
co-located subscribers go zero-copy (cross-process consumers fall back
to DDS, so this is safe either way).

test_compose.launch.py:
- fcu_url/gcs_url as launch arguments instead of hardcoded URLs
- add an 'executor' argument (mt by default, events/auto opt-in). The
  Callback Group Events executor's component-container support is still
  immature upstream (ros2/rclcpp#3186: shutdown double-remove;
  ros2/rclcpp#3123: container support), so default to the reliable
  component_container_mt and only use component_container
  --executor-type events-cbg when asked
- resolve URLs in an OpaqueFunction so list parameters keep their type
- tone down container log level from DEBUG to INFO

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
vooon added a commit to mavlink/mavros that referenced this pull request Aug 4, 2026
Enable use_intra_process_comms(true) for the mavros_node container and
the dynamically created plugin nodes, so the internal MAVLink bus and
co-located subscribers go zero-copy (cross-process consumers fall back
to DDS, so this is safe either way).

test_compose.launch.py:
- fcu_url/gcs_url as launch arguments instead of hardcoded URLs
- add an 'executor' argument (mt by default, events/auto opt-in). The
  Callback Group Events executor's component-container support is still
  immature upstream (ros2/rclcpp#3186: shutdown double-remove;
  ros2/rclcpp#3123: container support), so default to the reliable
  component_container_mt and only use component_container
  --executor-type events-cbg when asked
- resolve URLs in an OpaqueFunction so list parameters keep their type
- tone down container log level from DEBUG to INFO

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants